Type Promise Is Not Assignable To Type Void |

[Solved] Type Promise Is Not Assignable To Type Void | | Solidity - Code Explorer | yomemimo.com
Question : Type 'Promise' is not assignable to type 'void | (() => void)'.

Answered by : embarrassed-echidna-ach0akx835am

useEffect(() => { const genRandomKey = async () => { console.log(await ecc.randomKey()) }; genRandomKey();
}, []);

Source : https://stackoverflow.com/questions/57238928/react-typescript-16-8-how-to-make-useeffect-async | Last Update : Tue, 20 Oct 20

Answers related to type promise is not assignable to type void | = void

Code Explorer Popular Question For Solidity